import 'package:flutter/material.dart';

/// FileName test_page_view
///
/// @Author lax
/// @Date 2024/6/4
///
/// @Description

class TestPageView extends StatefulWidget {
  final int page;

  const TestPageView({super.key, required this.page});

  @override
  State<StatefulWidget> createState() {
    return _TestPageViewState();
  }
}

class _TestPageViewState extends State<TestPageView> {
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(child: Text(count.toString(), textScaleFactor: 5)),
      floatingActionButton: FloatingActionButton(
        child: Text('+${widget.page}'),
        onPressed: () {
          setState(() {
            count += widget.page;
          });
        },
      ),
    );
  }
}
